<form class="form-inline" role="form" method="post" id="frmSearch" action="<?= base_url() ?>masterprofile/index/">
    <div class="container-fluid" style="text-align: center;">
        <div class="row">
            <select name="ddFilter" id="ddFilter">
                <option value="mpa_fullname" <?=@$ddFilter == 'mpa_fullname'? 'selected':''?>>Nama</option>
                <option value="mpa_id_alumni" <?=@$ddFilter == 'mpa_id_alumni'? 'selected':''?>>ID Alumni</option>
                <option value="mpa_nis" <?=@$ddFilter == 'mpa_nis'? 'selected':''?>>NIS</option>
                <option value="mpa_graduate_year" <?=@$ddFilter == 'mpa_graduate_year'? 'selected':''?>>Tahun Lulus</option>
            </select>
            <input type="text" name="txtSearch" id="txtSearch" value="<?= @$txtSearch ?>"/>
            <input type="submit" class="btn btn-primary" value="Cari"/>
            <a class="btn btn-success" href="<?=  site_url('masterprofile/upload')?>"> Upload Data Kelulusan</a>
        </div>
    </div>
</form>
<table class="table table-bordered table-striped responsive-utilities">
    <thead>
        <tr>
            <th>ID Alumni</th>
            <th>NIS</th>
            <th>Nama</th>
            <th>Tgl Lahir</th>
            <th>JenKel</th>
            <th>Lulus</th>
            <th>Action</th>
        </tr>
    </thead>
    <tbody>
        <? if (@$alumni) : ?>
            <? foreach ($alumni as $k => $v) : ?>
                <tr>
                    <td><?= $v->mpa_id_alumni ?></td>
                    <td><?= $v->mpa_nis ?></td>
                    <td><?= $v->mpa_fullname ?></td>
                    <td><?= $v->mpa_birth_date ?></td>
                    <td><?= $v->mpa_gender ?></td>
                    <td><?= $v->mpa_graduate_year ?></td>
                    <td>
                       <!--<a href="<?= base_url() ?>masterprofile/edit/<?= $v->mpa_id_alumni ?>">Edit</a> | --> <a href="<?= base_url() ?>masterprofile/delete/<?= $v->mpa_id_alumni ?>">Hapus</a>
                    </td>
                </tr>
            <? endforeach; ?>
            <? if ($this->paginationpopup->create_links() <> "") : ?>
                <tr>
                    <th colspan="7" style="text-align: center;"><?php echo $this->paginationpopup->create_links(); ?></th>
                </tr>
            <? endif; ?>
        <? else : ?>
            <tr>
                <td colspan="7">Tidak ada data yang tersedia</td>
            </tr>
        <? endif; ?>
    </tbody>
</table>
<script>
    function pageClick(page){
        var action = $("#frmSearch").attr("action");
        $("#frmSearch").attr("action", action + page);
        $("#frmSearch").submit();
    };
</script>